how to find word in file python

101

how to find word in file python -

with open('example.txt') as f:
    if 'blabla' in f.read():
        print("true")

Comments

Submit
0 Comments